package academia.gui;


import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.SystemColor;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Component;
import java.awt.Toolkit;
import java.awt.Color;

public class TelaInicio extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	

	/**
	 * Create the frame.
	 */
	public TelaInicio() {
		setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
		setAlwaysOnTop(false);
		setBackground(SystemColor.inactiveCaptionBorder);
		setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\En\u00E9ias\\Desktop\\Academia\\background01.jpg"));
		setTitle("Active Fitness");
	    
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBackground(SystemColor.inactiveCaption);
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		
		JLabel lblActiveFitness = new JLabel("Active Fitness");
		lblActiveFitness.setBackground(new Color(192, 192, 192));
		lblActiveFitness.setBounds(115, 40, 309, 30);
		lblActiveFitness.setForeground(new Color(255, 255, 255));
		lblActiveFitness.setFont(new Font("Dialog", Font.BOLD, 29));
		
		final JButton btnSair = new JButton("Sair");
		btnSair.setFont(new Font("Tahoma", Font.PLAIN, 11));
		
		final JButton btnEntrarComoRoot = new JButton("Entrar como Root");
		btnEntrarComoRoot.setFont(new Font("Tahoma", Font.PLAIN, 11));
		btnEntrarComoRoot.setBackground(new Color(152, 251, 152));
		btnEntrarComoRoot.setBounds(135, 117, 160, 23);
		btnEntrarComoRoot.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				new MenuRoot().setVisible(true);
				dispose();
			}
		});
		contentPane.setLayout(null);
		contentPane.add(btnEntrarComoRoot);
		contentPane.add(lblActiveFitness);
		
		
		btnSair.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				System.exit(0);
			}
		});
		btnSair.setBackground(new Color(255, 160, 122));
		btnSair.setBounds(135, 151, 160, 23);
		contentPane.add(btnSair);
		
		JButton button = new JButton("!");
		button.setFont(new Font("Tahoma", Font.BOLD, 11));
		button.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				new TelaInfo().setVisible(true);
				
			}
		});
		button.setForeground(SystemColor.text);
		button.setBackground(SystemColor.inactiveCaption);
		button.setBounds(10, 228, 37, 23);
		contentPane.add(button);
		setFocusTraversalPolicy(new FocusTraversalOnArray(new Component[]{contentPane, lblActiveFitness, btnEntrarComoRoot}));
	}

}
